﻿using System;
namespace Producers.Rr.Xtee.Riik.Ee.Producer.Rr {
    
    
    [global::Xtee.Core.Attributes.XmlTypeAttribute(Name="RR404_isik_v1_vastus", Namespace="http://producers.rr.xtee.riik.ee/producer/rr", Target=typeof(RR404IsikV1Vastus))]
    public class RR404IsikV1VastusSerializer : global::Xtee.Core.Types.AbstractXteeSerializable {
        
        protected IRR404IsikV1Vastus clazz;
        
        public RR404IsikV1VastusSerializer(IRR404IsikV1Vastus clazz) {
            this.clazz = clazz;
        }
        
        public override void WriteXml(global::Xtee.Core.IXteeXmlWriter Writer) {
            base.WriteXml(Writer);
            Writer.WriteStartElement("ttIsikud404");
            if (clazz.TtIsikud404!=null) {
                Writer.WriteTypeAttribute("http://schemas.xmlsoap.org/soap/encoding/", "Array");
                Writer.WriteArrayTypeAttribute(">>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404", "http://producers.rr.xtee.riik.ee/producer/rr", clazz.TtIsikud404.Count);
                for (int x = 0; ((clazz.TtIsikud404 != null) 
                            && (x < clazz.TtIsikud404.Count)); x = (x + 1)) {
                    if (clazz.TtIsikud404[x]!=null) {
                        Writer.WriteStartElement("ttIsikud404");
                        global::Xtee.Core.SerializationMetadata metaTtIsikud404 = this.GetMetaData(clazz.TtIsikud404[x]);
                        Writer.WriteTypeAttribute(metaTtIsikud404.TypeQualifiedName.Namespace, metaTtIsikud404.TypeQualifiedName.Name);
                        metaTtIsikud404.NewSerializer(clazz.TtIsikud404[x]).WriteXml(Writer);
                        Writer.WriteEndElement();
                    }
                }
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404");
            }
            Writer.WriteEndElement();
        }
        
        public override void ReadXml(global::Xtee.Core.IXteeXmlReader Reader) {
            base.ReadXml(Reader);
            if (Reader.LocalName=="ttIsikud404") {
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>RR404_isik_v1_vastus>ttIsikud404");
                }
                clazz.TtIsikud404 = new System.Collections.Generic.List<RR404IsikV1Vastus.ITtIsikud404Type>();
                if ((Reader.IsEmptyElement == false)) {
                    Reader.ReadStartElement("ttIsikud404");
                    for (; ((Reader.NodeType != System.Xml.XmlNodeType.EndElement) 
                                && (Reader.LocalName == "ttIsikud404")); ) {
                        if (Reader.IsElementNil()) {
                            throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404");
                        }
                        global::Xtee.Core.SerializationMetadata metaTtIsikud404 = this.GetMetaData<RR404IsikV1Vastus.ITtIsikud404Type>(Reader, ">>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404", "http://producers.rr.xtee.riik.ee/producer/rr");
                        RR404IsikV1Vastus.ITtIsikud404Type item = metaTtIsikud404.NewEntity<RR404IsikV1Vastus.ITtIsikud404Type>();
                        clazz.TtIsikud404.Add(item);
                        if ((Reader.IsEmptyElement == false)) {
                            Reader.ReadStartElement("ttIsikud404");
                            metaTtIsikud404.NewSerializer(item).ReadXml(Reader);
                            Reader.ReadEndElement();
                        }
                        else {
                            Reader.Skip();
                        }
                    }
                    Reader.ReadEndElement();
                }
                else {
                    Reader.Skip();
                }
            }
            else {
                throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>RR404_isik_v1_vastus>ttIsikud404", Reader.LocalName);
            }
        }
        
        [global::Xtee.Core.Attributes.XmlTypeAttribute(Name=">>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404", Namespace="http://producers.rr.xtee.riik.ee/producer/rr", Target=typeof(RR404IsikV1Vastus.TtIsikud404Type))]
        public class TtIsikud404TypeSerializer : global::Xtee.Core.Types.AbstractXteeSerializable {
            
            protected RR404IsikV1Vastus.ITtIsikud404Type clazz;
            
            public TtIsikud404TypeSerializer(RR404IsikV1Vastus.ITtIsikud404Type clazz) {
                this.clazz = clazz;
            }
            
            public override void WriteXml(global::Xtee.Core.IXteeXmlWriter Writer) {
                base.WriteXml(Writer);
                Writer.WriteStartElement("ttIsikud404.cIsikukood");
                if (clazz.TtIsikud404cIsikukood!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cIsikukood))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cIsikukood");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cPerenimi");
                if (clazz.TtIsikud404cPerenimi!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cPerenimi))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cPerenimi");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cEesnimi");
                if (clazz.TtIsikud404cEesnimi!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cEesnimi))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cEesnimi");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cMPerenimed");
                if (clazz.TtIsikud404cMPerenimed!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cMPerenimed))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cMPerenimed");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cMEesnimed");
                if (clazz.TtIsikud404cMEesnimed!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cMEesnimed))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cMEesnimed");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cRiikKood");
                if (clazz.TtIsikud404cRiikKood!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cRiikKood))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cRiikKood");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cRiik");
                if (clazz.TtIsikud404cRiik!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cRiik))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cRiik");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cIsanimi");
                if (clazz.TtIsikud404cIsanimi!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cIsanimi))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cIsanimi");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cSugu");
                if (clazz.TtIsikud404cSugu!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cSugu))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cSugu");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cSynniaeg");
                if (clazz.TtIsikud404cSynniaeg!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cSynniaeg))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cSynniaeg");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cSurmKpv");
                if (clazz.TtIsikud404cSurmKpv!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cSurmKpv))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cSurmKpv");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cTeoVoime");
                if (clazz.TtIsikud404cTeoVoime!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cTeoVoime))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cTeoVoime");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cIsStaatus");
                if (clazz.TtIsikud404cIsStaatus!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cIsStaatus))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cIsStaatus");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cKirjeStaatus");
                if (clazz.TtIsikud404cKirjeStaatus!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cKirjeStaatus))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cKirjeStaatus");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cEKRiik");
                if (clazz.TtIsikud404cEKRiik!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cEKRiik))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cEKRiik");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cEKMaak");
                if (clazz.TtIsikud404cEKMaak!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cEKMaak))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cEKMaak");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cEKVald");
                if (clazz.TtIsikud404cEKVald!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cEKVald))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cEKVald");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cEKAsula");
                if (clazz.TtIsikud404cEKAsula!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cEKAsula))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cEKAsula");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cEKVkoht");
                if (clazz.TtIsikud404cEKVkoht!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cEKVkoht))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cEKVkoht");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cEKTanav");
                if (clazz.TtIsikud404cEKTanav!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cEKTanav))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cEKTanav");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cEKNimi");
                if (clazz.TtIsikud404cEKNimi!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cEKNimi))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cEKNimi");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cEKMaja");
                if (clazz.TtIsikud404cEKMaja!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cEKMaja))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cEKMaja");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cEKKorter");
                if (clazz.TtIsikud404cEKKorter!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cEKKorter))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cEKKorter");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cEKIndeks");
                if (clazz.TtIsikud404cEKIndeks!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cEKIndeks))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cEKIndeks");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cEKAlgKpv");
                if (clazz.TtIsikud404cEKAlgKpv!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cEKAlgKpv))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cEKAlgKpv");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cEKVallaKpv");
                if (clazz.TtIsikud404cEKVallaKpv!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cEKVallaKpv))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cEKVallaKpv");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cEKAadress");
                if (clazz.TtIsikud404cEKAadress!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cEKAadress))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cEKAadress");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cSideAdrRiik");
                if (clazz.TtIsikud404cSideAdrRiik!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cSideAdrRiik))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cSideAdrRiik");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cSideAdrMaak");
                if (clazz.TtIsikud404cSideAdrMaak!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cSideAdrMaak))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cSideAdrMaak");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cSideAdrVald");
                if (clazz.TtIsikud404cSideAdrVald!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cSideAdrVald))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cSideAdrVald");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cSideAdrAsula");
                if (clazz.TtIsikud404cSideAdrAsula!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cSideAdrAsula))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cSideAdrAsula");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cSideAdrVkoht");
                if (clazz.TtIsikud404cSideAdrVkoht!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cSideAdrVkoht))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cSideAdrVkoht");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cSideAdrTanav");
                if (clazz.TtIsikud404cSideAdrTanav!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cSideAdrTanav))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cSideAdrTanav");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cSideAdrNimi");
                if (clazz.TtIsikud404cSideAdrNimi!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cSideAdrNimi))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cSideAdrNimi");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cSideAdrMaja");
                if (clazz.TtIsikud404cSideAdrMaja!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cSideAdrMaja))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cSideAdrMaja");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cSideAdrKorter");
                if (clazz.TtIsikud404cSideAdrKorter!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cSideAdrKorter))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cSideAdrKorter");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cSideAdrIndeks");
                if (clazz.TtIsikud404cSideAdrIndeks!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cSideAdrIndeks))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cSideAdrIndeks");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cSideEpost");
                if (clazz.TtIsikud404cSideEpost!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cSideEpost))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cSideEpost");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("ttIsikud404.cSideTelefon");
                if (clazz.TtIsikud404cSideTelefon!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TtIsikud404cSideTelefon))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TtIsikud404cSideTelefon");
                }
                Writer.WriteEndElement();
            }
            
            public override void ReadXml(global::Xtee.Core.IXteeXmlReader Reader) {
                base.ReadXml(Reader);
                if (Reader.LocalName=="ttIsikud404.cIsikukood") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cIsikukood");
                    }
                    clazz.TtIsikud404cIsikukood = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cIsikukood")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cIsikukood", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cPerenimi") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cPerenimi");
                    }
                    clazz.TtIsikud404cPerenimi = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cPerenimi")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cPerenimi", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cEesnimi") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cEesnimi");
                    }
                    clazz.TtIsikud404cEesnimi = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cEesnimi")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cEesnimi", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cMPerenimed") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cMPerenimed");
                    }
                    clazz.TtIsikud404cMPerenimed = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cMPerenimed")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cMPerenimed", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cMEesnimed") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cMEesnimed");
                    }
                    clazz.TtIsikud404cMEesnimed = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cMEesnimed")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cMEesnimed", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cRiikKood") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cRiikKood");
                    }
                    clazz.TtIsikud404cRiikKood = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cRiikKood")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cRiikKood", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cRiik") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cRiik");
                    }
                    clazz.TtIsikud404cRiik = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cRiik")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cRiik", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cIsanimi") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cIsanimi");
                    }
                    clazz.TtIsikud404cIsanimi = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cIsanimi")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cIsanimi", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cSugu") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cSugu");
                    }
                    clazz.TtIsikud404cSugu = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cSugu")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cSugu", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cSynniaeg") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cSynniaeg");
                    }
                    clazz.TtIsikud404cSynniaeg = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cSynniaeg")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cSynniaeg", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cSurmKpv") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cSurmKpv");
                    }
                    clazz.TtIsikud404cSurmKpv = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cSurmKpv")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cSurmKpv", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cTeoVoime") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cTeoVoime");
                    }
                    clazz.TtIsikud404cTeoVoime = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cTeoVoime")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cTeoVoime", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cIsStaatus") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cIsStaatus");
                    }
                    clazz.TtIsikud404cIsStaatus = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cIsStaatus")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cIsStaatus", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cKirjeStaatus") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cKirjeStaatus");
                    }
                    clazz.TtIsikud404cKirjeStaatus = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cKirjeStaatus")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cKirjeStaatus", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cEKRiik") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cEKRiik");
                    }
                    clazz.TtIsikud404cEKRiik = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cEKRiik")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cEKRiik", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cEKMaak") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cEKMaak");
                    }
                    clazz.TtIsikud404cEKMaak = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cEKMaak")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cEKMaak", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cEKVald") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cEKVald");
                    }
                    clazz.TtIsikud404cEKVald = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cEKVald")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cEKVald", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cEKAsula") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cEKAsula");
                    }
                    clazz.TtIsikud404cEKAsula = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cEKAsula")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cEKAsula", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cEKVkoht") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cEKVkoht");
                    }
                    clazz.TtIsikud404cEKVkoht = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cEKVkoht")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cEKVkoht", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cEKTanav") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cEKTanav");
                    }
                    clazz.TtIsikud404cEKTanav = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cEKTanav")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cEKTanav", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cEKNimi") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cEKNimi");
                    }
                    clazz.TtIsikud404cEKNimi = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cEKNimi")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cEKNimi", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cEKMaja") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cEKMaja");
                    }
                    clazz.TtIsikud404cEKMaja = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cEKMaja")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cEKMaja", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cEKKorter") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cEKKorter");
                    }
                    clazz.TtIsikud404cEKKorter = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cEKKorter")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cEKKorter", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cEKIndeks") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cEKIndeks");
                    }
                    clazz.TtIsikud404cEKIndeks = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cEKIndeks")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cEKIndeks", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cEKAlgKpv") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cEKAlgKpv");
                    }
                    clazz.TtIsikud404cEKAlgKpv = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cEKAlgKpv")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cEKAlgKpv", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cEKVallaKpv") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cEKVallaKpv");
                    }
                    clazz.TtIsikud404cEKVallaKpv = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cEKVallaKpv")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cEKVallaKpv", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cEKAadress") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cEKAadress");
                    }
                    clazz.TtIsikud404cEKAadress = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cEKAadress")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cEKAadress", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cSideAdrRiik") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cSideAdrRiik");
                    }
                    clazz.TtIsikud404cSideAdrRiik = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cSideAdrRiik")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cSideAdrRiik", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cSideAdrMaak") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cSideAdrMaak");
                    }
                    clazz.TtIsikud404cSideAdrMaak = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cSideAdrMaak")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cSideAdrMaak", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cSideAdrVald") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cSideAdrVald");
                    }
                    clazz.TtIsikud404cSideAdrVald = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cSideAdrVald")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cSideAdrVald", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cSideAdrAsula") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cSideAdrAsula");
                    }
                    clazz.TtIsikud404cSideAdrAsula = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cSideAdrAsula")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cSideAdrAsula", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cSideAdrVkoht") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cSideAdrVkoht");
                    }
                    clazz.TtIsikud404cSideAdrVkoht = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cSideAdrVkoht")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cSideAdrVkoht", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cSideAdrTanav") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cSideAdrTanav");
                    }
                    clazz.TtIsikud404cSideAdrTanav = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cSideAdrTanav")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cSideAdrTanav", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cSideAdrNimi") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cSideAdrNimi");
                    }
                    clazz.TtIsikud404cSideAdrNimi = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cSideAdrNimi")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cSideAdrNimi", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cSideAdrMaja") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cSideAdrMaja");
                    }
                    clazz.TtIsikud404cSideAdrMaja = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cSideAdrMaja")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cSideAdrMaja", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cSideAdrKorter") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cSideAdrKorter");
                    }
                    clazz.TtIsikud404cSideAdrKorter = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cSideAdrKorter")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cSideAdrKorter", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cSideAdrIndeks") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cSideAdrIndeks");
                    }
                    clazz.TtIsikud404cSideAdrIndeks = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cSideAdrIndeks")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cSideAdrIndeks", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cSideEpost") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cSideEpost");
                    }
                    clazz.TtIsikud404cSideEpost = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cSideEpost")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cSideEpost", Reader.LocalName);
                }
                if (Reader.LocalName=="ttIsikud404.cSideTelefon") {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cSideTelefon");
                    }
                    clazz.TtIsikud404cSideTelefon = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ttIsikud404.cSideTelefon")).Value;
                }
                else {
                    throw new global::Xtee.Core.Exceptions.UnExpectedElementException(">>>>RR404_isik_v1_vastus>ttIsikud404>ttIsikud404>ttIsikud404.cSideTelefon", Reader.LocalName);
                }
            }
        }
    }
}
